import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)
 import {CaseInfo} from './module/CaseInfo';

let initCase =  new CaseInfo();
// let initCase = new CaseInfo();
let store = new Vuex.Store({
    state:{
        caseInfo:initCase,
    },
    mutations:{
        //添加代码
        add(state,payload){
            this.state.caseInfo = {...initCase,...payload};
        },
        //修改代码
        update(state,payload){
            this.state.caseInfo = {...payload};
        }
        
    }
})

export {store}